package Fonction;


import java.awt.Component;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.UIManager;
import javax.swing.table.TableCellRenderer;


public class BoutonDansCelluleJTable extends JButton implements TableCellRenderer 
{
	
	public void ButtonRenderer() 
    {
        setOpaque(true);
        setBounds(10,10,25,25);
    }

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value,
            boolean isSelected, boolean hasFocus, int row, int column) 
    {
        if (isSelected) 
        {
            setForeground(table.getSelectionForeground());
            setBackground(table.getSelectionBackground());
        } else 
        {
            setForeground(table.getForeground());
            setBackground(UIManager.getColor("Button.background"));
        }
        setText((value == null) ? "" : value.toString());
        return this;
    }
	
}